<route lang="json5" type="page">
{
  layout: 'default',
  style: {
    navigationBarTitleText: '资讯',
  },
}
</route>

<template>
  <view class="">
    <wd-gap bg-color="#FFFFFF" height="10"></wd-gap>

    <view class="bg-#fafafa h-50px w-full block flex flex-row items-center">
      <view class="flex flex-row justify-start items-center px-12px">
        <view class="w-4px h-14px bg-#62a3f4"></view>
        <text class="ml-2px font-bold">最新资讯</text>
      </view>
    </view>

    <view class="w-full" v-for="(item, index) in list" :key="index">
      <NewCard :item="item" />
    </view>
  </view>
</template>

<script lang="ts" setup>
import { wenzhangliebiaoVo } from '@/api/types'
import NewCard from '@/components/new-card/new-card.vue'
defineProps({
  list: {
    type: Array<wenzhangliebiaoVo>,
    required: true,
  },
})
</script>

<style lang="scss" scoped>
.news-card {
  border-bottom: 1px solid #f8f8f8;
  &-content {
    &-title {
      display: -webkit-box;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
    &-intro {
      display: -webkit-box;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      -webkit-line-clamp: 1;
      -webkit-box-orient: vertical;
    }
  }
}
</style>
